
class Fire {
    constructor(game) {
        this.game = game
        this.setUp()
    }
    static new = function(game) {
        var i = new this(game)
        return i
    }

    setUp() {
        this.name = 'fire'
        this.image = GuaImage.new(this.game, 'fire')
        this.life = 3
        this.alive = true

    }

    fired() {
        if (this.life == 0) {
            this.alive = false
        }
        this.life--
    }

    init(x, y) {
        this.image.setPosition(x, y)
    }

    draw() {
        if (this.alive) {
            this.image.draw()
        }
    }

    update() {
        

        this.fired()
    }
}